package com.qing.module;

import android.app.Application;

import com.qing.common.util.LogUtil;

/**
 * @author qing <br/>
 * 2025/2/23
 */
public class BaseApplication extends Application {

    private static final String TAG = "BaseApplication";

    @Override
    public void onCreate() {
        super.onCreate();
        LogUtil.Logger logger = LogUtil.INSTANCE.createDefaultLogger(getApplicationContext());
        LogUtil.INSTANCE.setLoggerImpl(logger);
        LogUtil.INSTANCE.setIsLogToLogcat(BuildConfig.DEBUG);
        LogUtil.INSTANCE.d(TAG, "应用初始化");
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
        LogUtil.INSTANCE.releaseLoggerImpl();
    }
}
